package com.kx.springmybatis.proxy.statiproxy;

/**
 * @ClassName LianJia
 * @Author Sun
 * @Date 2021/5/18 15:31
 */
public class LianJia implements Available {
    //链家代理房东做房东应该做的工作，中介可能会代理很多房东的房子

    private Available Landlord;

    public void setLandlord(Available landlord) {
        Landlord = landlord;
    }

    @Override
    public void kanfang() {
        System.err.println("链家中介带顾客看房");
    }

    @Override
    public String qianhetong() {
        System.err.println("链家中介和顾客签合同");
        Landlord.qianhetong();
        return "10000";
    }

    @Override
    public void shoufangzu(int money) {
        System.err.println("你把" + money + "交给了中介");
        Landlord.shoufangzu(10000);
    }
}
